<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>

<html>

 <head>
    
    <title>币别信息管理</title>
    <!-- import css and js -->
	<%@ include file="/common/meta.jsp" %>

		<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
	<script type="text/javascript">
		var basic_Url="${ctx}/yd/basic/currency";
		var basic_WUrl="yd/basic/currency";
		var basic_Title="添加";
		var show_Width=350;
		var show_Hight=200;
		function createSearch(){
			init(1,2,'140,140','25%');

			//第一行的数据
			addCommon(0,0,"lable","币别名称：");
			addCommon(0,1,"txtlike","currencyname");
		}
		function searchAP(){			
			multipleSearch("#table1",true,"",basic_Url+"/list.do");
		}
		 function getSelected(){
			 var grid = $("#table1").ligerGetGridManager(); 
				var rows = grid.getCheckedRows();
				if(rows.length==0){
					alert("请选择一行数据!");
					return null;
				}else{
					return rows[0];
				}
			}
		 $(function(){
		 var grid = $("#table1").ligerGrid({
		        columns: [
		                  { display: '币别名称', name: 'currencyname', width: 250 },
		                  { display: '汇率', name: 'exchangeRate', width: 250,isSort:false},
		                  { display: '创建人', name: 'dcruser', width: 250},
		                  { display: '创建时间', name: 'dctime', width: 250,
		                	  render: function (item){
		                		  var cdate=new Date(item.dctime);
		                		  return formatDate(cdate,"yyyy-MM-dd");
		                	  }
		                  }
		                      ],  usePager: true,pageSize:15,
		                      url : basic_Url+"/list.do",enabledSort:false,
		                      width: '100%', height: '98%',pageSizeOptions :[15,25,35], checkbox: true,rownumbers:true,           
		                      onDblClickRow : function (data, rowindex, rowobj){
		                          edit(data);
		                       }
		                  });
			$("#pageloading").hide();
		 });
	</script>
  </head>
<body onLoad="createSearch()">
   <div id="layout1">
   
          <div class="panelBar">
	            <ul class="toolBar">
	             
		           <li><a class="add" onclick="add()">
		           
		          
		           
		           <span>添加</span></a></li>
				   <li><a class="delete" onclick="del()"><span>删除</span></a></li>
				 
               </ul>
          </div>
          <div id="pageHeader" class="pageHeader">
               <div class="searchBar" id="multipleSearchDialog">
	                <table class="table" width="100%" id="searchHeader" >  
                        <tbody id="newbody">
                        </tbody>
 	                </table>
                    <div class="subBar">
			             <ul>
				             <li><div class="buttonActive"><div class="buttonContent"><button type="submit" id="btnSearch" onclick="searchAP()">查询</button></div></div></li>
				             <li><a class="button" onclick="clearSearch()"><span>重置</span></a></li>
			             </ul>
	                </div>
               </div>
          </div>
      </div>
      <div position="center" id="table1">
      </div>
      <div class="clear"></div>
   </div>
 
</body>
</html>